package org.catspaw.cherubim.text.phonics;

import java.text.Collator;
import java.util.Comparator;
import java.util.Locale;

/**
 * 以汉字拼音的英文字母顺序比较两个字符串
 * @author 孙宁振
 */
public class SimplePinyinComparator implements Comparator<String> {

	private static final Collator	CHINESE_COLLATOR	= Collator
																.getInstance(Locale.CHINESE);

	public int compare(String o1, String o2) {
		return CHINESE_COLLATOR.compare(o1, o2);
	}
}
